import pandas as pd

# 读取 Excel 文件
df = pd.read_excel('card_1019.xls')

# 清洗包含货币符号的列并转换为字符串类型
df['交易额 (￥)'] = df['交易额 (￥)'].astype(str).str.replace(',', '').str.replace('$', '')

# 计算总计数量、面额、交易额、收入
total_quantity = df['面额'].count()
total_denomination = df['面额'].sum()
total_transaction_amount = df['交易额 (￥)'].astype(float).sum()
total_income = df['收入 (￥)'].astype(float).sum()

# 输出结果
print(f"总计：数量：{total_quantity}条 面额：{total_denomination:,.2f} 交易额：{total_transaction_amount:,.2f} 收入：{total_income:,.2f}")
